<template>
  <el-form :model="formSwitch">
    <el-form-item label="欠费是否拉闸：" prop="lower">
      <el-switch v-model="formSwitch.switch" active-color="#13ce66" inactive-color="#e1e1e1"></el-switch>
    </el-form-item>
    <el-form-item v-if="formSwitch.switch" label="欠费拉闸时间：" prop="lower">
      <el-time-picker v-model="formSwitch.time" placeholder="选择时间"></el-time-picker>
    </el-form-item>
    <p v-if="formSwitch.switch" class="gray">当房间余额欠费时，电表会进行拉闸断电操作，请设置合理的拉闸时间，设置范围为8:00:00~24:00:00</p>
    <div class="text-center">
      <el-button type="primary" size="small" @click="callBack">确认修改</el-button>
    </div>
  </el-form>
</template>

<script>
export default {
  name: "formMessage",
  props: {
    formSwitch: {
      type: Object,
      type: {},
    },
  },
  methods: {
    callBack() {
      this.$emit("callBack");
    },
  },
};
</script>

<style lang="scss" scoped>
.gray {
  font-size: 14px;
}
</style>
